package com.zy.cat.entity.mall;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "zy_cat_goods_category_info", indexes = {
		@Index(name = "id", columnList = "id"),
		@Index(name = "level", columnList = "level"),
		@Index(name = "status", columnList = "status"),
		@Index(name = "parentId", columnList = "parent_id")})
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫商品类别")
/**
 * 字段改动,必须联系 Link
 * @info 
 * @author Link
 * @date 2020-06-22 17:25
 */
public class CatGoodsCategoryInfo {
	
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Id
	@Column(columnDefinition = "INT(32) NOT NULL COMMENT '商品类目ID'")
	@ApiModelProperty(value = "商品类目ID", example = "20101906")
	private int id;
	
	@Column(columnDefinition = "VARCHAR(32) NOT NULL COMMENT '商品类目名称'")
	@ApiModelProperty(value = "商品类目名称", example = "大额券")
	private String name;
	
	@Column(name = "item_url",columnDefinition = "VARCHAR(225) COMMENT '商品类目图标'")
	@ApiModelProperty(value = "商品类目图标", example = "http://")
	private String itemUrl;
	
	@Column(name = "material_id",columnDefinition = "INT(32) COMMENT '物料id'")
	@ApiModelProperty(value = "物料id", example = "13256")
	private Integer materialId;
	
	@Column(columnDefinition = "INT(4) DEFAULT '0' COMMENT '分类排序'")
	@ApiModelProperty(value = "分类排序", example = "2")
	private int sort;
	
	@Column(name = "parent_id",columnDefinition = "BIGINT(32) DEFAULT '0'  COMMENT '商品类目父类ID'")
	@ApiModelProperty(value = "商品类目父类ID", example = "20101906")
	private int parentId;
	
	@Column(name = "level",columnDefinition = "BIGINT(32) NOT NULL COMMENT '商品类目级别(1.一级类目、2.二级类目)'")
	@ApiModelProperty(value = "商品类目级别(1.一级类目、2.二级类目)", example = "1")
	private int level;
	
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '类目类型(0.淘宝、1.拼多多、2.京东)'")
	@ApiModelProperty(value = "类目类型(0.淘宝、1.拼多多、2.京东)", example = "0")
	private int ltype;
	
	@Column(columnDefinition = "INT(2) DEFAULT '0' COMMENT '应用平台(0.通用、1.九趣猫、2.花生狗)'")
	@ApiModelProperty(value = "应用平台(0.通用、1.九趣猫、2.花生狗)", example = "0")
	private int ctype;
	
	@Column(columnDefinition = "INT(2)  DEFAULT '0'   COMMENT '商品类目状态(0.不可用、1.可用)'")
	@ApiModelProperty(value = "商品类目状态(0.不可用、1.可用)", example = "1")
	private int status;
	
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '创建时间[9趣猫商品类别]'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22 12:56:56:666")
	private String ctime;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更改时间'")
	@ApiModelProperty(value = "最后更改时间", example = "2019-02-22 12:56:56:666")
	private String ltime;
}
